package com.eas.biz.dao.user.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.eas.biz.dao.user.dataobject.StudentDO;
import com.eas.biz.dao.user.interfaces.StudentDao;
import com.eas.biz.framework.BaseQuery;
import com.eas.biz.framework.dao.GenericDaoImpl;

@Repository("studentDao")
public class StudentDaoImpl extends GenericDaoImpl<StudentDO> implements StudentDao {

    public StudentDO selectById(long id) {
        return selectById("Student.selectById", id);
    }

    public long insert(StudentDO student) {
        return insert("Student.addStudent", student);
    }

    public int deleteById(long id) {
        return deleteById("Student.deleteById", id);
    }

    public int update(StudentDO student) {
        return update("Student.update", student);
    }

    public List<StudentDO> selectByQuery(BaseQuery query) {
        return selectByQuery("Student.selectByQuery", query);
    }

    public int countByQuery(BaseQuery query) {
        return countByQuery("Student.countByQuery", query);
    }

}
